package config

type Config struct {
	Zap      Zap      `yaml:"zap"`
	Postgres Postgres `yaml:"postgres"`
	Redis    Redis    `yaml:"redis"`
	System   System   `yaml:"private"`
}

type Zap struct {
	Prefix     string `yaml:"prefix"`
	Level      string `yaml:"level"`
	Path       string `yaml:"path"`
	Filename   string `yaml:"filename"`
	MaxSize    int    `yaml:"maxSize"`
	MaxBackups int    `yaml:"maxBackups"`
	MaxAge     int    `yaml:"maxAge"`
}

type Postgres struct {
	Host     string `yaml:"host"`
	Port     string `yaml:"port"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	Database string `yaml:"database"`
	Schema   string `yaml:"schema"`
	MaxIdle  int    `yaml:"maxIdle"`
	MaxOpen  int    `yaml:"maxOpen"`
}

type System struct {
	ProjectName     string `yaml:"projectName"`
	Port            int    `yaml:"port"`
	SuccessCode     int    `yaml:"successCode"`
	SuccessMessage  string `yaml:"successMessage"`
	ErrorCode       int    `yaml:"errorCode"`
	ErrorMessage    string `yaml:"errorMessage"`
	BindError       string `yaml:"bindError"`
	NeedInitialData bool   `yaml:"needInitialData"`
}

type Redis struct {
	Host     string `yaml:"host"`
	Port     string `yaml:"port"`
	Password string `yaml:"password"`
	Database int    `yaml:"database"`
}
